package com.zzy.web.controller.purchase;

import com.zzy.common.core.domain.AjaxResult;
import com.zzy.system.service.IDetectReportService;
import com.zzy.system.service.IPurchaseOrderService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.io.IOException;
import java.sql.BatchUpdateException;

/**
 * @return 商品溯源报告
 * @Description
 * @Author zhouzhiyong
 * @Date 2025/3/1 13:43
 **/
@Api(value = "Order", tags = {"商品"}, hidden = false)
@RestController
public class DetectReportController
{
    @Autowired
    private IDetectReportService iDetectReportService;




    @GetMapping("/getGuanmaiProductTraceList")
    @ApiOperation("获取检测报告")
    public AjaxResult getGuanmaiProductTraceList(@RequestParam(value = "status",defaultValue = "3") Integer status,
                                                  @RequestParam("startDate") String startDate,
                                                  @RequestParam("endDate") String endDate,
                                                  @RequestParam(value = "offset",defaultValue = "0") Integer offset,
                                                  @RequestParam(value = "limit",defaultValue = "100") Integer limit) throws Exception {
        AjaxResult ajax = AjaxResult.success();
        iDetectReportService.getGuanmaiProductTraceList( status, startDate, endDate, offset, limit);
        return ajax;
    }

}
